package top.hjc.orange.test.UserController;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.hjc.orange.user.domain.api.UserResource;

import java.util.Objects;
import java.util.Optional;

/**
 * @author: huangjicheng
 * @date: 2025/10/11
 * @desc：
 */

@RestController
public class UserController {

    private final UserResource userResource;

    public UserController(UserResource userResource) {
        this.userResource = userResource;
    }

    @RequestMapping("/test")
    public UserView1 findById() {
        Optional<UserView1> byId = userResource.findById(1L, UserView1.class);
        return byId.orElse(null);
    }
}
